package com.hsjk.szwj.module.pay.dal.mysql;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hsjk.szwj.module.pay.dal.dataobject.order.PayOrderDivisionRecordDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/08/22 01:41
 **/
@Mapper
public interface IPayOrderDivisionRecordMapper extends BaseMapper<PayOrderDivisionRecordDO> {

    /** 查询全部分账成功金额 **/
    Long sumSuccessDivisionAmount(Long payOrderId);

    /**  batch_order_id 去重， 查询出所有的 分账已受理状态的订单， 支持分页。 */
    IPage<PayOrderDivisionRecordDO> distinctBatchOrderIdList(IPage<?> page,
                                                             @Param("ew") Wrapper<PayOrderDivisionRecordDO> wrapper);

}

